package com.example.mysaat.service_menu_manual_test.Listeners;

import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Toast;

import com.example.mysaat.MainActivity;

public class MyManualTestOnItemListener implements AdapterView.OnItemClickListener {


    @Override
    public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
        transmissionActivityById(i);
    }

    private void transmissionActivityById(int i){
        Intent intent = null;
        switch (i){
            case 0:{
                intent = new Intent("android.intent.action.AutoPressActivity");
                intent.addCategory("android.intent.category.AutoPressActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 1:{
                intent = new Intent("android.intent.action.KeyPressActivity");
                intent.addCategory("android.intent.category.KeyPressActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 2:{
                intent = new Intent();
                intent.setAction("android.intent.action.DisplayCheckActivity");
                intent.addCategory("android.intent.category.DisplayCheckActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);                break;
            }
            case 3:{
                intent = new Intent();
                intent.setAction("android.intent.action.RingActivity");
                intent.addCategory("android.intent.category.RingActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 4:{
                intent = new Intent();
                intent.setAction("android.intent.action.VibratorActivity");
                intent.addCategory("android.intent.category.VibratorActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 5:{
                intent = new Intent();
                intent.setAction("android.intent.action.MotionSensorActivity");
                intent.addCategory("android.intent.category.MotionSensorActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 6:{
                intent = new Intent();
                intent.setAction("android.intent.action.LoopbackActivity");
                intent.addCategory("android.intent.category.LoopbackActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 7:{
                intent = new Intent();
                intent.setAction("android.intent.action.GPS_BT_WIFIActivity");
                intent.addCategory("android.intent.category.GPS_BT_WIFIActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 8:{
                intent = new Intent();
                intent.setAction("android.intent.action.TouchDrawActivity");
                intent.addCategory("android.intent.category.TouchDrawActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 9:{
                intent = new Intent();
                intent.setAction("android.intent.action.Camera_MainActivity");
                intent.addCategory("android.intent.category.Camera_MainActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 10:{
                intent = new Intent();
                intent.setAction("android.intent.action.CamcorderActivity");
                intent.addCategory("android.intent.category.CamcorderActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 11:{
                intent = new Intent();
                intent.setAction("android.intent.action.Camera_TVActivity");
                intent.addCategory("android.intent.category.Camera_TVActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 12:{
                intent = new Intent();
                intent.setAction("android.intent.action.NFCActivity");
                intent.addCategory("android.intent.category.NFCActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            case 13:{
                intent = new Intent();
                intent.setAction("android.intent.action.OTGActivity");
                intent.addCategory("android.intent.category.OTGActivity");
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                MainActivity.context.startActivity(intent);
                break;
            }
            default:
                break;
        }
    }
}
